package com.kiwilss.aopdemo.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author : Administrator
 * e-mail : kiwilss@163.com
 * time   : 2021/01/25
 * desc   :
 */
public class JavaBean implements Parcelable {

    private String name;
    private int age;


    protected JavaBean(Parcel in) {
       this.name = in.readString();
       this.age = in.readInt();
    }

    public static final Creator<JavaBean> CREATOR = new Creator<JavaBean>() {
        @Override
        public JavaBean createFromParcel(Parcel in) {
            return new JavaBean(in);
        }

        @Override
        public JavaBean[] newArray(int size) {
            return new JavaBean[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeInt(this.age);
    }
}

